package org.raymond.iworks.study.orders.entity;

import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.GenericGenerator;
import org.raymond.iworks.repository.entity.AbstractEntity;

import java.math.BigDecimal;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(onlyExplicitlyIncluded=true, callSuper = false)
@Entity
@Table(name="t_products")
public class TProducts extends AbstractEntity {
    @EqualsAndHashCode.Include
    @Id
    @GenericGenerator(name = ID_GENERATOR_NAME, strategy = ID_GENERATOR)
    @GeneratedValue(generator = ID_GENERATOR_NAME)
    private Long id;
    @Column(name="product_name")
    private String productName;
    @Column(name="product_unit_price")
    private BigDecimal productUnitPrice;
}
